import Vue from 'vue'
import Toast from './toast.vue'

const ToastConstructor = Vue.extend(Toast)

const MessageDiv = function (options) {
  console.log(options)
  const instance = new ToastConstructor({
    el: document.createElement('div'),
    data: options
  })
  document.body.appendChild(instance.$el)
  return instance
}

export default MessageDiv
